﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTOSingTowerMall;

namespace BLSingTowerMall
{
    public class EventProcess
    {
        private DBSingTowerMallEntities cntx = new DBSingTowerMallEntities();

        public IQueryable<IEventHallBooking> getEvents()
        {
            IQueryable<IEventHallBooking> eventsList = (from f in cntx.EventHallBookings
                                                        where f.Status == "Approved"
                                                        select f);
            return eventsList;

        }

        public IQueryable<IEventHallBooking> getEventsBetween(DateTime fromDate, DateTime toDate)
        {
            IQueryable<IEventHallBooking> eventsList = from f in cntx.EventHallBookings 
                                                        where f.EventStartDateTime>= fromDate && f.EventEndDateTime<=toDate
                                                        
                                                        select f;
            return eventsList;
        }
    }
}
